package demo2.category;

import java.util.Collection;

public interface CategoryTree<NodeType> {
    NodeType getSelf();

    Collection<? extends CategoryTree<NodeType>> getChildren();

    int countChildren();

    /**
     * 递归查询所有子结点数量
     * @return 子节点数量
     */
    int recursivelyCountAllChildren();
}
